{include file="styles/header.tpl"}
<div id="content" class="box">
	<h1>Extra Tool - Intergrate Po</h1>
	<p>&nbsp;</p>
	<form method="post" action="" enctype="multipart/form-data" target="ifrmData" onsubmit="return doSubmit();">
	<fieldset>
		<legend>Po Data (CSV File)</legend>
		<label>Country: </label>
		<select name="cn">
			{foreach from=$arrCountry item=country}
			<option value="{$country.id}" class="{$country.id}"{if ($selectedCountry == $country.id)}selected="selected"{/if}>
				{$country.name}</option>
			{/foreach}
		</select>
		
		<label>CSV file:</label>
		<input type="file" name="file" size="120" readonly="true" />
		<!--
		<label>Delimiter:</label> <input type="text" size="1" value="," name="strDelimiter" />-->
		<input type="submit" value="Upload & Intergate Data" class="bt" />
	</fieldset>
	</form>
	<iframe name="ifrmData" id="ifrmData" width="100%" style="display:none"></iframe>
	
	<form method="post" action="{$smarty.const.HOST_ADMIN}/extra-tool/download-intergrated-po">
	<fieldset>
		<legend>Download Intergated Data</legend>
		<label>Country: </label>
		<select name="cn">
			{foreach from=$arrCountry item=country}
			<option value="{$country.id}" class="{$country.id}"{if ($selectedCountry == $country.id)}selected="selected"{/if}>
				{$country.name}</option>
			{/foreach}
		</select>
		<input type="submit" value="Download" class="bt" />
	</fieldset>
	</form>
</div>
{literal}
<script type="text/javascript">
	function doSubmit()
	{
		showWaiting();
		return true;
	}
	
	function update_done()
	{
		alert('The process is done.');
		window.location.href = window.location.href;
		$.unblockUI();
	}
</script>
{/literal}
{include file="styles/footer.tpl"}